#include "Renderer_PCH.h"
#include "RenderTypeEvent.h"

/*--------------------------------------------------------------------------*/

RenderTypeEvent::RenderTypeEvent(const std::string& name) :
	m_typerenderer(NULL)
{
	g_Renderer->GetTypeRenderer(name, m_argument, &m_typerenderer);
}

/*--------------------------------------------------------------------------*/

RenderTypeEvent::~RenderTypeEvent()
{

}

/*--------------------------------------------------------------------------*/

bool RenderTypeEvent::CallEvent()
{
	if (m_typerenderer)
	{
		m_typerenderer->RenderType(m_argument);
	}
	else
	{
		__Crash(false);
	}

	return true;
}

/*--------------------------------------------------------------------------*/

